package com.maolong.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author maolong
 * @since 2025-02-09
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "Product对象", description = "")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("产品名称")
    private String name;

    @ApiModelProperty("历史入库总量")
    private Integer inventorySum;

    @ApiModelProperty("库存值")
    private Integer inventory;

    @ApiModelProperty("出库总值")
    private Integer inventoryRemove;

    @ApiModelProperty("单位")
    private String unit;

    @ApiModelProperty("库房地址多个存储用 ，号隔开如： 库房，位置，位置编号")
    private String localtion;

    @ApiModelProperty("1告警0是正常")
    private Integer alarm;

    @ApiModelProperty("物件编号")
    private String code;

    @ApiModelProperty("警告值 库存值低于警告值告警提示")
    private Integer alarmValue;

    @ApiModelProperty("型号")
    private String type;

    @ApiModelProperty("产品条形码地址")
    private String img;

    @ApiModelProperty("产品图片地址")
    private String prodImg;

    @ApiModelProperty("状态 1开启，0删除")
    private Integer statusCode;

    @ApiModelProperty("创建用户id")
    private Long addUser;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern="yy-mm-dd HH:mm:ss")
    private LocalDateTime addTime;

    @ApiModelProperty("更新人")
    private Long editUser;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern="yy-mm-dd HH:mm:ss")
    private LocalDateTime editTime;


}
